<extend name="work/base" />
<block name="content">

    <form class="layui-form inline-form">
        <div class="pull-left">


        </div>

    </form>
    <table class="layui-table text-center" id="list" lay-filter="list" list-url="{:url('lists')}" edit-url="{:url('edit')}" assigned-url="{:url('editcategory')}" del-url="{:url('delete')}"></table>

</block>

<block name="script">
    <script type="text/html" id="barDemo">
        <a class="layui-btn  layui-btn-xs" lay-event="assigned">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>

    </script>
    <script type="text/html" id="view">
        {{ d.a_time==1?'生成':'使用'}}
    </script>

    <script type="text/html" id="view1">
        {{ d.a_time<1?'--':layui.util.toDateString(d.a_time*1000, 'yyyy-MM-dd  HH:mm')}}
    </script>
    <script type="text/html" id="view2">
        {{ d.c_time<1?'--':layui.util.toDateString(d.c_time*1000, 'yyyy-MM-dd  HH:mm')}}
    </script>
    <script type="text/html" id="viewimg">
       <img class="img" src="{{d.img}}">
           </script>
    <script type="text/javascript">
        layui.use([ 'element', 'table'], function(){
            var table = layui.table;
            table.render({
                elem: '#list'
                ,url:"{:Url('lists')}"
                ,toolbar: '<div></div>'
                ,page:true
                ,loading:true
                ,title:'品牌表'
                ,limit:20
                ,defaultToolbar: ['filter', 'print', 'exports']
                ,cols: [[
                    {field:'nickname', width:110, title: '操作人员'}
                    ,{field:'c_time', width:150, title: '操作时间',templet:'#view2'}
                    ,{field:'content', width:250, title: '操作内容'}
                    ,{field:'info', width:550,title: '操作详情'}


                ]]
            });
        });
    </script>
</block>
